package com.ehotting.mqbd.zw.api.domain.netty.task;

import com.ehotting.mqbd.zw.api.constants.ActionConstants;
import com.ehotting.mqbd.zw.api.domain.netty.ZwCommPacket;
import com.ehotting.mqbd.zw.api.domain.protoc.ZwTaskResponse;
import com.google.protobuf.InvalidProtocolBufferException;

/**
 * 单向的，s->c
 */
public class TaskProgressAckReq extends ZwCommPacket {

    private ZwTaskResponse.ZwTaskProgressAck zwTaskProgressAck;

    public TaskProgressAckReq() {
        super(ActionConstants.Cmd_TaskProgressAckStr);
    }

    @Override
    public void convertToHexStr() {
    }

    @Override
    public void convertToProp() {
        byte[] buff = this.getBuff();
        int bufSize = this.getHead().getBufSize();
        if (buff==null||bufSize==0){
            return;
        }
        try {
            this.zwTaskProgressAck = ZwTaskResponse.ZwTaskProgressAck.parseFrom(buff);
        } catch (InvalidProtocolBufferException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        TaskProgressAckReq req = new TaskProgressAckReq();
        System.out.println(req.toString());

    }
}
